-
Couldn't load subscription status.
- Fork 462
[Instrumentation] Add attributes to synchronous KV operations #5277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b64842e to
c7817f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use instrumentation-tail-worker.js? That might not have been around when you first wrote this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. It feels a little weird to be pulling it in from ../../cloudflare/internal/test, but that's no reason not to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workerd/jsg/util.c++:393: error: e = kj/filesystem.c++:319: failed: expected parts.size() > 0 [0 > 0]; can't use ".." to break out of starting directory
Actually that breaks everything 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instrumentation-tail-worker.js?
That applies to src/cloudflare/internal/test/instrumentation-test-helper.js, I believe Mar meant src/workerd/api/tests/instrumentation-tail-worker.js. This is being used in several other tests such as src/workerd/api/kv-test.wd-test already, so we can hopefully use it here too.
(Having competing instrumentation-test-helper.js and instrumentation-tail-worker.js implementations is highly confusing, we plan to merge them soon).
c7817f7 to
067e2fa
Compare
CodSpeed Performance ReportMerging #5277 will not alter performanceComparing Summary
Footnotes
|
| compatibilityDate = "2025-08-01", | ||
|
|
||
| compatibilityFlags = ["enable_ctx_exports", "nodejs_compat"], | ||
| compatibilityFlags = ["enable_ctx_exports", "nodejs_compat", "streaming_tail_worker", "tail_worker_user_spans"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: tail_worker_user_spans has been obsoleted and is no longer needed anywhere
|
LGTM otherwise, just make sure to use one of the existing tail workers here as suggested, that will make the test easier to maintain in the future. |
Follow on to #5251
Add the following attributes to the existing spans:
durable_object_storage_kv_get
db.system.name
db.operation.name
cloudflare.durable_object.kv.query.keys
cloudflare.durable_object.kv.query.keys.count
durable_object_storage_kv_list
db.system.name
db.operation.name
cloudflare.durable_object.kv.query.start
cloudflare.durable_object.kv.query.startAfter
cloudflare.durable_object.kv.query.end
cloudflare.durable_object.kv.query.prefix
cloudflare.durable_object.kv.query.reverse
cloudflare.kv.query.limit
durable_object_storage_kv_put
db.system.name
db.operation.name
cloudflare.durable_object.kv.query.keys
cloudflare.durable_object.kv.query.keys.count
durable_object_storage_kv_delete
db.system.name
db.operation.name
cloudflare.durable_object.kv.query.keys
cloudflare.durable_object.kv.query.keys.count
cloudflare.durable_object.kv.response.deleted_count